package com.test.Aspect;

import com.test.enums.ReplayCode;
import lombok.Data;

@Data
public class BusinessException extends RuntimeException{

    private Integer code;

    private String msg;

    public BusinessException(Integer code, String msg) {
        super();
        this.code = code;
        this.msg = msg;
    }

    public BusinessException(ReplayCode replayCode) {
        super();
        this.code = replayCode.getCode();
        this.msg = replayCode.getMsg();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

}